import {request} from '@/utils/request'

export function register(data) {
    return request({
        url: '/api/auth/register',
        method: 'post',
        data
    })
}

export function sendCheckCode(data) {
    return request({
        url: '/sendCheckCode',
        method: 'post',
        data
    })
}

export function login(data) {
    return request({
        url: '/user/login',
        method: 'post',
        data
    })
}

export function logout() {
    return request({
        url: '/api/auth/logout',
        method: 'post',
    })
}

export function getUser() {
    return request({
        url: '/api/user',
        method: 'get',
    })
}